package com.wzdigit.wms.basic.mapper.core.basic;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wzdigit.framework.orm.mybatis.MyBatisRepository;
import com.wzdigit.wms.basic.domain.basic.ZoneGroup;
import com.wzdigit.wms.basic.client.request.basic.SearchZoneGroupRequest;
import com.wzdigit.wms.basic.client.response.basic.ZoneGroupApiResponse;
import com.wzdigit.wms.basic.client.response.basic.ZoneGroupResponse;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 区域 Mapper 接口
 * </p>
 *
 * @author 
 * @since 2020-12-28
 */
@MyBatisRepository
public interface ZoneGroupMapper extends BaseMapper<ZoneGroup> {
	
	@SuppressWarnings("rawtypes")
	List<ZoneGroupResponse> selectAll(@Param("dto") SearchZoneGroupRequest dto);

	ZoneGroupResponse selectOneByZoneGroupId(@Param("zoneGroupId") Integer zoneGroupId);
	
	List<ZoneGroupApiResponse> selectAllByStatus(@Param("status") Integer status);

	List<ZoneGroupApiResponse> selectAllByWhsId(@Param("whsId") Integer whsId);

	ZoneGroup selectOneByZoneGroupCode(@Param("zoneGroupCode") String zoneGroupCode);

	ZoneGroup selectOneByZoneGroupName(@Param("zoneGroupName") String zoneGroupName);
	
	int updateStatus(ZoneGroup record);
	
    int deleteByPrimaryKey(Integer zoneGroupId);

    int insert(ZoneGroup record);

    ZoneGroup selectByPrimaryKey(Integer zoneGroupId);

    int updateByPrimaryKeySelective(ZoneGroup record);

    int updateByPrimaryKey(ZoneGroup record);
}